<?php echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" ?>
<?php echo "<?xml-stylesheet type=\"text/xsl\" href=\"" . $this->assetDir . "/css/xml-sitemap.xsl\"?>\n" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
        http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">       
    <?php foreach ($items as $item): 
        ?>
        <?php
        if ($item['link'] != ''):
            ?>    
            <url>
                <loc><?php echo $item['link'] ?></loc>
                <lastmod><?php echo $lastmod = date("c", $item['lastmod']);?></lastmod>
                <changefreq><?php echo $item['freq'] ?></changefreq>
                <priority><?php echo $item['priority'] ?></priority>
            </url>    
        <?php endif; ?>
    <?php endforeach; ?>

</urlset>
